<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="misapplication-tap-highlight" content="no"/>
		<meta name="HandheldFriendly" content="true"/>
		<meta name="MobileOptimized" content="320"/>
		<title>社区</title>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" charset="utf-8">
		mui.plusReady(function() {

    	 	/*var self = plus.webview.currentWebview();
			var str = self.str;
			if(str == undefined){
				str = "";
			}
			alert(str);*/
		    mui.init({
                subpages:[{
                    url:'plus/Community/communityList.html',//子页面HTML地址，支持本地地址和网络地址
                    id:'communityList',//子页面标志
                    styles:{
                        top:'45px',//子页面顶部位置
                        bottom:'0',//子页面底部位置
                    },
                }]
            	});
		  
//		    mui('.nav_list').on('tap', 'a', function(e) {
//		    	var str = "";
//	    	    $(".select").removeClass("select");
//	    		$(this).addClass("select");
//		    	var test= document.getElementById("wy").getElementsByTagName("a");
//			      for (var i=0;i<test.length;i++){
//			      	test[i].onclick=function(){
//			      		str=this.innerHTML+"";
//		    	//alert($(this).innerHTML);
////			    	mui.init({
////	                subpages:[{
////	                    url:'plus/Community/communityList.html',//子页面HTML地址，支持本地地址和网络地址
////	                    id:'communityList',//子页面标志
////	                    extras: {
////										str:str
////									},
////	                    styles:{
////	                        top:'90px',//子页面顶部位置
////	                        bottom:'0',//子页面底部位置
////	                    },
////	                }]
////	            	});
//				      	}
//				      }
//			      		
//		    	//alert(str);
//              });
             //var user_id = plus.storage.getItem('user_id');   
            //发帖
            document.getElementById('communityEdit').addEventListener('tap', function() {
                mui.openWindow({
                    url: 'plus/Community/communityEdit.html', 
                    id:'communityEdit'
                });
            }); 
            //进入首页面
            document.getElementById('indexTab').addEventListener('tap', function() {
                mui.openWindow({
                    url: 'index.html', 
                    id:'index'
                });
            }); 
            //进入社区页面
            document.getElementById('communityTab').addEventListener('tap', function() {
            	var userinfo = plus.storage.getItem('userinfo');
            	if (userinfo != '' && userinfo != null) {
            		mui.openWindow({
                        url: 'community.html', 
                        id:'community'
                   }); 
            	} else{
            		mui.openWindow({
                        url: 'login.html', 
                        id:'login'
                    });
            	}
                
            }); 
            
            //进入个人中心页面
            document.getElementById('dataTab').addEventListener('tap', function() {
            	var userinfo = plus.storage.getItem('userinfo');
            	if (userinfo != '' && userinfo != null) {
	                mui.openWindow({
	                    url: 'data.html', 
	                    id:'data'
	                });
            	} else{
            		mui.openWindow({
                        url: 'login.html', 
                        id:'login'
                    });
            	}
            });
            
            //进入我的帖子列表页面
            document.getElementById('myCom').addEventListener('tap', function() {
                mui.openWindow({
                    url: 'plus/Data/myCommunity.html', 
                    id:'myCom'
                });
            });
        });
		</script>

		<link rel="stylesheet" href="css/mui.min.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-bar-nav~.mui-content {
				padding: 0;
			}
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
				padding: 10px 0;
                border-bottom: 1px solid #ddd;
			}
			/*.nav{
				height:65px;
				background: white;
			}
			.nav ul{
				list-style:none;
				padding: 0;
				margin-left: 0;
			}
			.nav ul li{
				float:left;
				width:25%;
				margin-top: 35px;
				text-align: center;
			}
			.nav ul li a{
				color: black;
			}
			.nav ul li .select{
				color: black;
                border-radius: 15px;
                background: #83E5AB;
                padding: 3px 5px;
			}
			.cur{
				color:darkcyan;
			}*/
/*菜单样式*/
.menu{ width: 100%; height: 45px; position: fixed; bottom:0; left:0; box-shadow: #2d2d2d 0 0 4px;background:#0099cc;}
.menu.menucurr{ background: #ea4c88;}
.menu ul{width: 100%; height: 100%; }
.menu li{ width: 24.9%; height: 100%; float: left; line-height: 45px; text-align: center; background: #0099cc; color:#fff;}
.menu li.curr{ background: #ea4c88;}
.menu li:nth-child(1),.menu li:nth-child(2),.menu li:nth-child(3){ border-right:1px solid #663300;}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<button id="myCom" class=" mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">我的帖子</button>
			<h1 class="mui-title">社区</h1>
			<a class="mui-icon mui-icon-compose mui-pull-right" id="communityEdit"></a>
		</header>
		<!--<div class="nav">  
		    <ul id="wy">       
			    <li class="nav_list "><a class="select">体验说说</a></li>
			    <li class="nav_list"><a>学习交流</a></li>
			    <li class="nav_list"><a>成长日记</a></li> 
			    <li class="nav_list"><a>意见反馈</a></li>  
		    </ul>
	    </div>-->
		<nav class="mui-bar mui-bar-tab" style="background: #E4E9EA;">
			<a id="indexTab" class="mui-tab-item" href="index.html">
				<span class="mui-icon mui-icon-home"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a id="communityTab" class="mui-tab-item mui-active" href="community.html">
				<span class="mui-icon mui-icon-pengyouquan"></span>
				<span class="mui-tab-label">社区</span>
			</a>
			<a id="dataTab" class="mui-tab-item" href="data.html">
				<span class="mui-icon mui-icon-contact"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
	</body>
</html>